import gl
import sys
print(sys.version)
print(gl.version())
gl.resetdefaults()

# Open background image (need to add rest of file path)
gl.loadimage('MRIcroGL/Resources/standard/mni152.nii.gz')

# Turn off smoothing
gl.overlayloadsmooth(0)

# Glass brain settings
gl.shadername('Glass')
gl.shaderadjust('boundThresh', 0.35)
gl.shaderadjust('boundBrightness',0.8)
#gl.shaderadjust('colorTemp', 0.1)

# Load overlay from correct file path
gl.overlayload('allTOM_atlas.nii.gz')

# Set overlay display parameters; 1 indicates 1st overlay
gl.colorname(1,"Grayscale")
#gl.colorname(2,"Grayscale")

gl.minmax(1,0,7)
#gl.minmax(2,0,1)


# Overlay blending
# gl.overlayadditiveblending(1)

# Set the color bar options 
gl.colorbarposition(0)

# Set the background color
gl.backcolor(255,255,255)

# Change brain layer opacity 
gl.opacity(0,85)

# Shift the camera angle
gl.azimuthelevation(228, 0)

# Save the image 
#gl.savebmp('Fig2b.png')
